function [outputArg1,outputArg2] = Hasselmann(Speed,Level,Sigma,DeltaT0,Ntrials,nPeriods,nSteps,dt)
% Form the Hull-White-Vasicek mean-reverting Gaussian diffusion model object.
obj=hwv(Speed,Level,Sigma,'StartState',DeltaT0); % See https://uk.mathworks.com/help/finance/hwv.html for documentation.
% Euler-Maruyama method, as described in e.g D. J. Higham, “An algorithmic
% introduction to numerical simulation of stochastic differential equations”,
% SIAM Review, vol. 43, no. 3, pp. 319–322, 2001. https://doi.org/10.1137/S0036144500378302.
% Implemented  by directly calling simByEuler
% and taking nSteps between each desired sample point.
% Returns both Delta T series and the dW series.
[DeltaT,Times,Z]=simByEuler(obj,nPeriods,'Nsteps',nSteps,'Ntrials',Ntrials,'DeltaTime', dt);
outputArg1 = DeltaT;
outputArg2 = Times;
end